/*
  Filename: models/User.js
  Description:
  This is the model to represent the internal user or familiar user when they are logged into the application.
  Through this model the profile view will be rendered, and the users could update their information.
 */
define([
  'utils/Conf',
  'models/Model',
  'collections/Collection'
], function(Conf, Model, Collection){
  // Nested models and collections to build the User model.
  var Familiars = Collection.extend({
    url: Conf.routes.users.familiars
  });

  var Internals = Collection.extend({
    url: Conf.routes.users.internals
  });
  
  // User model
  var User = Model.extend({
    initialize: function() {
      this.familiars = new Familiars();
      this.internals = new Internals();
    },
    
/*    defaults: {
      "name": "",
      "password": "",
      "profile": {
        "firstName": "",
        "lastName": ""
      }
    },
 */   
    url: function() {
      var urlBase = Conf.routes.users.profile;
      return urlBase;
    }

  });

  return User;
});